<!DOCTYPE html>
<html>
<head>
    <title></title>
    <#include "/header.html"/>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <#if shiro.hasPermission("cgs:cgsquestion:update")>
                <a class="btn btn-primary" @click="look"><i class="fa fa-pencil-square-o"></i>&nbsp;详情</a>
            </#if>
            <#if shiro.hasPermission("cgs:cgsquestion:delete")>
                <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            </#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default" align="center">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal" style="width:70%!important;">
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">申请人姓名</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="cgsQuestion.applyUserName"
                           placeholder="申请人姓名" readonly/>
                </div>
                <div class="col-sm-2 control-label" style="width: 10%;">身份证号</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="cgsQuestion.idCardNum"
                           placeholder="身份证号" readonly/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">联系方式</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="cgsQuestion.mobile"
                           placeholder="联系方式" readonly/>
                </div>
                <div class="col-sm-2 control-label" style="width: 10%;">地址</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="cgsQuestion.address" placeholder="地址"
                           readonly/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">问题内容</div>
                <div class="col-sm-10" style="width: 40%;">
                    <textarea type="text" class="form-control" width="80%" v-model="cgsQuestion.questionContent"
                              placeholder="问题内容" readonly></textarea>
                </div>
                <div class="col-sm-2 control-label" style="width: 10%;">申请时间</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="cgsQuestion.createTime"
                           placeholder="申请时间" readonly/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">回复内容</div>
                <div class="col-sm-10" style="width: 40%;">
                    <textarea type="text" class="form-control" width="80%" v-model="cgsQuestion.answer"
                              placeholder="回复内容" readonly></textarea>
                </div>
                <div class="col-sm-2 control-label" style="width: 10%;">回复时间</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="cgsQuestion.answerTime"
                           placeholder="回复时间" readonly/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">是否公众展示</div>
                <div class="col-sm-10" style="width: 40%;">
                    <select class="form-control" v-model="cgsQuestion.isToAll" disabled>
                        <option v-for="item in sfzs" :value="item.value">{{item.text}}</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">问题相关图片</div>
                <div class="col-sm-10" style="width: 40%;">
                    <a href="#" class="thumbnail">
                        <img :src="cgsQuestion.questionImg" style="width:300px;height:200px;"
                             alt="通用的占位符缩略图">
                    </a>
                </div>
            </div>
            <div class="form-group">
                <#if shiro.hasPermission("cgs:cgsquestion:huifu")>
                    <temlate v-if="cgsQuestion.answer === ''">
                        <input type="button" class="btn btn-warning" data-toggle="modal" data-target="#cgsquestionModal"
                               value="回复"/>
                    </temlate>
                </#if>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>

    <div class="modal fade" id="cgsquestionModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title">
                        咨询回复
                    </h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal">
                        <div class="form-group">
                            <div class="col-sm-2 control-label">回复内容</div>
                            <div class="col-sm-10">
                                <textarea type="text" class="form-control" v-model="shenpi.answer"></textarea>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <input type="button" class="btn btn-primary" @click="huifu" value="保存"/>
                    <button type="button" class="btn btn-warning" data-dismiss="modal">关闭</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/cgs/cgsquestion.js?_${.now?long}"></script>
</body>
</html>